class SingleTon:
    __obj = None
    __init_flag = True

    def __new__(cls, *args, **kwargs):
        if cls.__obj == None:
            cls.__obj = object.__new__(cls)
        return cls.__obj

    def __init__(self, name):
        if self.__init_flag:
            self.name = name
            self.__init_flag = False

a = SingleTon("a")
b = SingleTon("b")
print(a.__dict__, b.__dict__)
print(id(a),id(b))